package com.lvhx.springboot.base;

public interface UnitOfWork {
    void commit();

    void start();

    boolean isTransactional();

    void rollback(Throwable cause);

    <T extends AggregateRoot> T getAggregate(Class<T> aggregateType,Object identifier);

    <T extends AggregateRoot> T registerAggregate(T aggregateRoot, SaveAggregateCallback<T> saveAggregateCallback);

}
